package org.example.mone.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName subtask
 */
@TableName(value ="subtask")
public class Subtask implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long taskId;

    /**
     * 
     */
    private Integer taskLevel;

    /**
     * 
     */
    private String name;

    /**
     * 
     */
    private Integer state;

    /**
     * 
     */
    private Integer stepNum;

    /**
     * 
     */
    private String stepNumName;

    /**
     * 
     */
    private Date startTime;

    /**
     * 
     */
    private Date endTime;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Long hostId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 
     */
    public Long getTaskId() {
        return taskId;
    }

    /**
     * 
     */
    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    /**
     * 
     */
    public Integer getTaskLevel() {
        return taskLevel;
    }

    /**
     * 
     */
    public void setTaskLevel(Integer taskLevel) {
        this.taskLevel = taskLevel;
    }

    /**
     * 
     */
    public String getName() {
        return name;
    }

    /**
     * 
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 
     */
    public Integer getState() {
        return state;
    }

    /**
     * 
     */
    public void setState(Integer state) {
        this.state = state;
    }

    /**
     * 
     */
    public Integer getStepNum() {
        return stepNum;
    }

    /**
     * 
     */
    public void setStepNum(Integer stepNum) {
        this.stepNum = stepNum;
    }

    /**
     * 
     */
    public String getStepNumName() {
        return stepNumName;
    }

    /**
     * 
     */
    public void setStepNumName(String stepNumName) {
        this.stepNumName = stepNumName;
    }

    /**
     * 
     */
    public Date getStartTime() {
        return startTime;
    }

    /**
     * 
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    /**
     * 
     */
    public Date getEndTime() {
        return endTime;
    }

    /**
     * 
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    /**
     * 
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 
     */
    public Long getHostId() {
        return hostId;
    }

    /**
     * 
     */
    public void setHostId(Long hostId) {
        this.hostId = hostId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Subtask other = (Subtask) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
            && (this.getTaskLevel() == null ? other.getTaskLevel() == null : this.getTaskLevel().equals(other.getTaskLevel()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getStepNum() == null ? other.getStepNum() == null : this.getStepNum().equals(other.getStepNum()))
            && (this.getStepNumName() == null ? other.getStepNumName() == null : this.getStepNumName().equals(other.getStepNumName()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getHostId() == null ? other.getHostId() == null : this.getHostId().equals(other.getHostId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
        result = prime * result + ((getTaskLevel() == null) ? 0 : getTaskLevel().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getStepNum() == null) ? 0 : getStepNum().hashCode());
        result = prime * result + ((getStepNumName() == null) ? 0 : getStepNumName().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getHostId() == null) ? 0 : getHostId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", taskId=").append(taskId);
        sb.append(", taskLevel=").append(taskLevel);
        sb.append(", name=").append(name);
        sb.append(", state=").append(state);
        sb.append(", stepNum=").append(stepNum);
        sb.append(", stepNumName=").append(stepNumName);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", hostId=").append(hostId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}